public function execute() {
$db = $this->getDB();
- $commentStore = new CommentStore( 'ipb_reason' );
+ $commentStore = CommentStore::getStore();
$params = $this->extractRequestParams();
$this->requireMaxOneParameter( $params, 'userids', 'users' );
}
$this->addTables( 'user_groups' );
- $this->addJoinConds( [ 'user_groups' => [ 'INNER JOIN', 'ug_user=user_id' ] ] );
+ $this->addJoinConds( [ 'user_groups' => [ 'JOIN', 'ug_user=user_id' ] ] );
$this->addFields( [ 'user_name' ] );
$this->addFields( UserGroupMembership::selectFields() );
$this->addWhere( 'ug_expiry IS NULL OR ug_expiry >= ' .
}
if ( isset( $this->prop['rights'] ) ) {
- $data[$key]['rights'] = $user->getRights();
+ $data[$key]['rights'] = $this->getPermissionManager()
+ ->getUserPermissions( $user );
}
if ( $row->ipb_deleted ) {
$data[$key]['hidden'] = true;
$data[$key]['blockedby'] = $row->ipb_by_text;
$data[$key]['blockedbyid'] = (int)$row->ipb_by;
$data[$key]['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp );
- $data[$key]['blockreason'] = $commentStore->getComment( $row )->text;
+ $data[$key]['blockreason'] = $commentStore->getComment( 'ipb_reason', $row )
+ ->text;
$data[$key]['blockexpiry'] = $row->ipb_expiry;
}